"use strict";
require([
    'polyfill',
    './dev/layer',
    './dev/nav',
    'swiper4',
    'text!tpl/caseList.hbs'
], function (polyfill, layer, nav, Swiper, caseTpl) {

    nav.showNav();

    const data ={
      "list":[{
        "imgSrc":"./images/cover/cover-1.png",
        "href":"book.html"
      },
        {
          "imgSrc":"./images/cover/cover-0.png",
          "href":"book.html"
        },
        {
          "imgSrc":"./images/cover/cover-2.png",
          "href":"book.html"
        }]
    }



    layer.setlayTpl("laytpl", "swip", caseTpl, data);

    const setSwiper = function () {
      const mySwiper = new Swiper('.swiper-container',{
        initialSlide :1,
        effect : 'coverflow',
        slidesPerView: 3,
        centeredSlides: true,
        pagination: {
          el: '.swiper-pagination',
          clickable :true,
        },
        coverflowEffect: {
          rotate: 10,
          stretch: 0,
          depth: 60,
          modifier: 2,
          slideShadows : true
        }
      });


    };


    setTimeout(function () {
      setSwiper();
    },100)






});
